<%@page contentType="text/html; charset=utf-8" %>
<%@ include file="/commons/taglibs.jsp"%>

<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title></title>
<link href="${ctx}/styles/listTable.css" rel="stylesheet" type="text/css">
<link href="${ctx}/styles/aux_window.css" rel="stylesheet" type="text/css">

<script language="JavaScript" type="text/javascript" src="${ctx}/scripts/public.js"></script>
<script language="JavaScript" type="text/javascript" src="${ctx}/scripts/global.js"></script>
<script language="JavaScript"  src="${ctx}/scripts/common/prototype.js"></script>
<script language="JavaScript" type="text/javascript" src="${ctx}/scripts/div/common.js"></script>
<script language="JavaScript" type="text/javascript" src="${ctx}/scripts/common.js"></script>
<script language="JavaScript" type="text/javascript" src="${ctx}/scripts/div/window.js"></script>

<%@ include file="/commons/validation.jsp" %>
<%@ include file="/commons/dateTime.jsp" %>
<script language="JavaScript">
	function showAdivceSearch()
	{
		var url = "${ctx}/customer_hisResidentAction.do?method=initACSearch";
		top.windowOpen(url, "houseChoose", "高级查询", 520, 550,false,'houseChoose');
	}

	function reLoadIFrameListWithQuery(){
		window.frames("hisResidentList").location.href = "${ctx}/customer_hisResidentAction.do?method=queryHisResList";
    }
    function submitSearch(){
	    var flag = $("residentSearch").fireEvent("onsubmit");
	    if(!flag) return;
    	var url = "${ctx}/customer_hisResidentAction.do?method=setCustsearchVOCache";
    	var parms = $("residentSearch").serialize();
    	sendAjaxRequest(url,parms,reLoadIFrameListWithQuery);
    }




</script>
</head>

<body onkeydown="if(event.keyCode==13)btn1_12.onclick();">
<c:if test="${isShowMenu }"><!-- isShowMenu=false表示是主线界面过来的,图标不用显示 -->
<div class="pageNav_bg">
  <table width="100%" border="0" cellspacing="0" cellpadding="0">
    <tr>
      <td id="pageNav_leftimg"><img src="${ctx}/images/ico_custome_household_history.gif" width="46" height="47"/></td>
      <td id="navWord"><span class="page_title">居住历史</span></td>
      <td class="pageNav_right"><a href="javascript:showFull_in();"><img id="full_image"  src="${ctx}/images/ico_fullscreen.gif" border="0"/></a></td>
    </tr>
  </table>
</div>
</c:if>


  <table width="100%" border="0" cellpadding="0" cellspacing="0">
    <tr>
      <td class="bg_search">
      <table border="0" cellpadding="0" cellspacing="1">
         <form name="residentSearch" method="post"
         	  action="${ctx}/customer_hisResidentAction.do?method=queryHisResInfo&type=search"
         	  target="hisResidentList" class="required-validate">
			<c:if test="${!isShowMenu }"><!-- isShowMenu=false表示是主线界面过来的,房号表单域显示  -->
				<input type="hidden" name="houseNumber" value="${houseNumber}">
			</c:if>
        <tr>
        <c:if test="${isShowMenu }"><!-- isShowMenu=false表示是主线界面过来的,不用显示 -->
          <td class="td_search">房号：
            <input name="houseNumber" value="" type="text" class="inputtext" size="10"></td>
        </c:if>
<td class="td_search">入住日期：</td>
          <td colspan="3" class="td_search"><table border="0" cellspacing="0" cellpadding="0">
              <tr>
                <td><input name="beginInDate" type="text" class="inputtext validate-date" afterInsert="beginInMsg" size="10" /></td>
                <td width="4">&nbsp;</td>
                <td>
                	<img id="beginInDateImageBtn" src="${ctx}/images/ico_clock.gif"  border="0" />
                	<span id="beginInMsg"></span>
                </td>
                <td width="4">&nbsp;</td>
                <td><input name="endInDate" type="text" class="inputtext validate-date" afterInsert="endInInMsg" size="10" /></td>
                <td width="4">&nbsp;</td>
                <td>
                	<img id="endInDateImageBtn" src="${ctx}/images/ico_clock.gif"  border="0" />
                	<span id="endInInMsg"></span>
                </td>
              </tr>
          </table></td>
          <td class="td_search">搬出日期：</td>
          <td colspan="2" class="td_search"><table border="0" cellspacing="0" cellpadding="0">
            <td><input name="beginOutDate" type="text" class="inputtext validate-date" afterInsert="beginOutMsg" size="10" /></td>
            <td width="4">&nbsp;</td>
              <td>
              	<img id="beginOutDateImageBtn" src="${ctx}/images/ico_clock.gif"  border="0" />
              	<span id="beginOutMsg"></span>
              </td>
              <td width="4">&nbsp;</td>
              <td><input name="endOutDate" type="text" class="inputtext validate-date" afterInsert="endOutMsg" size="10" /></td>
              <td width="4">&nbsp;</td>
              <td>
              	<img id="endOutDateImageBtn" src="${ctx}/images/ico_clock.gif"  border="0" />
              	<span id="endOutMsg"></span>
              </td>
            </tr>
          </table></td>
          <td class="td_search">
	          <table border="0" cellpadding="0" cellspacing="0">
	              <tr>
	                <td class="buttonOffLeft" id="btn1_11"></td>
	                <td class="buttonOffMiddle" id="btn1_12" onblur="btn_change(1)" onMouseOver="btn_change_over(1)" onMouseOut="btn_change_out(1)" onclick="submitSearch();">
	                <img  src="${ctx}/images/ico_searchico.gif" alt="" border="0" align="absmiddle" /> 查询</td>
	                <td class="buttonOffRight" id="btn1_13"></td>
	              </tr>
	          </table>
          </td>
        </tr>
        </form>
      </table></td>
    </tr>
<c:if test="${isShowMenu }"><!-- isShowMenu=false表示是主线界面过来的,房号表单域显示  -->
    <tr>
      <td class="bg_toolBar">&nbsp;</td>
    </tr>
</c:if>
    <tr>
    	<td >
    	<iframe id="hisResidentList"  name="hisResidentList" frameborder="0" src="${ctx}/customer_hisResidentAction.do?method=initHisResidentList" width="100%" ></iframe>
   		 </td>
    </tr>
    </table>

</body>
<script type="text/javascript">
			//入住开始日期
              Calendar.setup(
              {
	              inputField : "beginInDate", // ID of the input field
	              ifFormat : "%Y-%m-%d", // the date format
	              button : "beginInDateImageBtn", // ID of the button
	              align          :    "Tl",           // alignment (defaults to "Bl")
			      singleClick    :    true
              }
              );
			//入住截至日期
              Calendar.setup(
              {
	              inputField : "endInDate", // ID of the input field
	              ifFormat : "%Y-%m-%d", // the date format
	              button : "endInDateImageBtn", // ID of the button
	              align          :    "Tl",           // alignment (defaults to "Bl")
			      singleClick    :    true
              }
              );
              //搬出开始日期
              Calendar.setup(
              {
	              inputField : "beginOutDate", // ID of the input field
	              ifFormat : "%Y-%m-%d", // the date format
	              button : "beginOutDateImageBtn", // ID of the button
	              align          :    "Tl",           // alignment (defaults to "Bl")
			      singleClick    :    true
              }
              );
			 //搬出截至日期
              Calendar.setup(
              {
	              inputField : "endOutDate", // ID of the input field
	              ifFormat : "%Y-%m-%d", // the date format
	              button : "endOutDateImageBtn", // ID of the button
	              align          :    "Tl",           // alignment (defaults to "Bl")
			      singleClick    :    true
              }
              );
</script>
</html>